package com.chapter11.chap_exercise;

public class Test03 {
    public static void main(String[] args) {
        Animal cat = new Cat();
        cat.shout();

        Animal dog = new Dog();
        dog.shout();

    }
}


abstract class Animal {
    public abstract void shout();
}
class Dog extends Animal {
    public void shout() {
        System.out.println("Dog shout");
    }
}
class Cat extends Animal {
    public void shout() {
        System.out.println("Cat cat");
    }
}
